<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
    aria-labelledby="createOrEditModal" aria-hidden="true" [config]="{backdrop: 'static', keyboard: !saving}">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <form *ngIf="active" #drawForm="ngForm" novalidate autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>导出规程</span>
                    </h4>
                    <button type="button" class="close" (click)="close()"  [attr.aria-label]="l('Close')"
                        [disabled]="saving">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <!-- <div class="row align-items-center m--margin-bottom-10">
                        <div class="col-xl-12">
                            <div class="form-group m-form__group align-items-center">
                                <div class="input-group">
                                    <input [(ngModel)]="filterText" name="filterText" autoFocus
                                        class="form-control m-input" [placeholder]="l('SearchWithThreeDot')"
                                        type="text">
                                    <span class="input-group-btn">
                                        <button (click)="getTableInfo()" class="btn btn-primary"><i
                                                class="flaticon-search-1" [attr.aria-label]="l('Search')"></i></button>
                                    </span>
                                </div>
                            </div>
                        </div>
                    </div> -->
                    <div class="primeng-datatable-container">
                        <p-table #dataTable [value]="tableData" [paginator]="false" [(selection)]="selectedItem"
                            [lazy]="true" dataKey="ipAddress" [scrollable]="true" ScrollWidth="100%"
                            [busyIf]="isLoading">
                            <ng-template pTemplate="header">
                                <tr>
                                    <th style="width: 50px">

                                        选择
                                    </th>
                                    <th style="width: 250px">

                                        Pad编号
                                    </th>
                                    <th style="width: 150px">
                                        Pad名称

                                    </th>
                                    <th style="width: 100px">
                                        Ip地址

                                    </th>
                                    <th style="width: 100px">
                                        端口

                                    </th>

                                </tr>
                            </ng-template>
                            <ng-template pTemplate="body" let-record="$implicit">
                                <tr>
                                    <td style="width: 50px">
                                        <p-tableRadioButton [value]="record"></p-tableRadioButton>
                                        <!-- <input type="checkbox" ng-model="record.id" ng-change="selectOne(record.id,record)"> -->
                                    </td>
                                    <td style="width: 250px">
                                        <span class="ui-column-title"> </span>
                                        {{record.padID}}
                                    </td>
                                    <td style="width: 150px">
                                        <span class="ui-column-title"></span>
                                        {{record.padName}}
                                    </td>
                                    <td style="width: 100px">
                                        <span class="ui-column-title"> </span>
                                        {{record.ipAddress}}
                                    </td>
                                    <td style="width: 100px">
                                        <span class="ui-column-title"> </span>
                                        {{record.port}}
                                    </td>
                                </tr>
                            </ng-template>
                        </p-table>
                        <div class="primeng-no-data" *ngIf="tableData&&tableData.length == 0">
                           未找到pad数据
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button [disabled]="saving" type="button" class="btn btn-primary" (click)="getTableInfo()">刷新</button>
                    <button  type="button" class="btn btn-default" (click)="close()">取消</button>
                    <button (click)="save()" type="button" class="btn btn-primary" [disabled]="!drawForm.form.valid"
                    [disabled]="!selectedItem"
                        [buttonBusy]="saving" [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i>
                        <span>导出</span></button>
                </div>
            </form>
        </div>
    </div>
</div>